home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C++ / Snippets / OSA_Runner 1.0d0 / sources / gVariables.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-20  |  1.1 KB  |  42 lines  |  [TEXT/CWIE]

  1. #pragma once
  2. /*    
  3. *    gVariables.h
  4. *
  5. *    OSA_Runner
  6. *    ^^^^^^^^^^
  7. *
  8. *    Declaration of global variables used by application.
  9. *    Tuck them all into one struct which can then be accessed app. wide.
  10. *    Do this to cut down on global name–space polution & keep track of
  11. *    program globals (they are easy to find if they are all in one struct!)
  12. *    © Andrew Nemeth (where applicable), Warrimoo Australia 1995
  13. *
  14. *    File created:        3 Oct 95.
  15. *    Modified:            3, 18, 20 Oct 95.
  16. */
  17.  
  18.  
  19. struct    myGlobalStruct {
  20.                     Boolean    boolDone;
  21.  
  22.                     //    Values that can be adjusted by other application code to change
  23.                     //    the behavior of the MainEventLoop.
  24.                     //
  25.                     //    Rules of thumb:
  26.                     //
  27.                     //        Increase 'xxxRunQuantum' (and decrease 'xxxSleepQuantum') when:
  28.                     //            The application has many threads running that need time
  29.                     //
  30.                     //        Decrease 'xxxRunQuantum' when:
  31.                     //            Sending AppleEvents to other applications
  32.                     //            Launching other applications
  33.                     //            Running in the background
  34.  
  35.                     unsigned long    foregroundRunQuantum,
  36.                                 foregroundSleepQuantum,
  37.                                 backgroundRunQuantum,
  38.                                 backgroundSleepQuantum;
  39.                     };
  40.  
  41. extern     struct myGlobalStruct     * gptrGlobalsRec;
  42.